#!/bin/bash

mkdir -p ~/.config
rm -rf ~/.config/firefox
git clone --depth=1 https://zhjch@codeup.aliyun.com/hevey/firefox.git ~/.config/firefox
/bin/bash -c "$(curl -fsSL https://gitee.com/hevey88/im-select/raw/master/install_mac.sh)"
(brew install exa lazygit neovim fzf fd bottom bat gdu ripgrep node python3 wechat bilibili \
&& xattr -d -r com.apple.quarantine /Applications/WeChat.app \
&& xattr -d -r com.apple.quarantine /Applications/哔哩哔哩.app \
&& ln -sf $(brew --prefix)/bin/gdu-go $(brew --prefix)/bin/gdu \
) &
(brew install --cask ~/.config/firefox/mambaforge.rb && bash ~/.config/firefox/mamba_config.sh &) &
(brew install --cask ~/.config/firefox/firefox-developer-edition.rb ~/.config/firefox/firefox-esr.rb \
&& xattr -d -r com.apple.quarantine /Applications/Firefox\ Developer\ Edition.app \
&& xattr -d -r com.apple.quarantine /Applications/Firefox.app \
&& python3 ~/.config/firefox/disable_auto_update.py \
) &
